var woyaojizan_button=document.getElementById("woyaojizan_button");
woyaojizan_button.onclick=function(){
	window.location.href="index.html"
}
var wyyjz=document.getElementsByClassName("wyyjz")[0];
wyyjz.onclick=function(){
	window.location.href="index.html"
}

//全局变量
var activeId,mppId;

ajax({
	url:"http://www.antmall.cc/public/wx/collect/data/"+activeId+"/"+mppId+".html",
	success:function(data){
		var info = JSON.parse(data);
		var gift=info.data.gift;
		var giftReceive=info.data.giftReceive;
		var oImg=document.getElementsByClassName("left")[0];
		var title=document.getElementsByClassName("name")[0];
		var total_num=document.getElementsByClassName("totalNum")[0];
		var address=document.getElementsByClassName("address")[0];
		var price_num=document.getElementsByClassName("price_num")[0];
		var top_goods=document.getElementsByClassName("top")[0];
		
		top_goods.onclick=function(){
			window.location.href="goodsinfo.html";
		}

		oImg.style.backgroundImage = "url("+gift.giftImg+")";
		title.innerHTML=giftReceive.title;
		total_num.innerHTML=giftReceive.giftTotal;
		address.innerHTML=info.data.active.bizShop.address;
		price_num.innerHTML=(giftReceive.giftPrice)/100;

		var xs_center=document.getElementsByClassName("xs_center")[0];
		xs_center.innerHTML=gift.samples;



	}
})

